import { createRouter, createWebHistory } from 'vue-router';
const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path:"/login",
      name:"login",
      component: () => import("@/views/login/Login.vue")
    },
    {
      path: '/',
      name: 'index',
      redirect:"/home"
    },
    {
      path: '/home',
      name: 'home',
      component: () => import("@/views/home/Home.vue"),
      children:[{
        path:"cpsd",
        name:"cpsd",
        component: () => import("@/views/admin/ChangePsd.vue"),
      },{
        path: 'adminList',
        name: 'adminList',
        component: () => import("@/views/admin/AdminList.vue"),
      },{
        path: 'carIn',
        name: 'carIn',
        component: () => import("@/views/car/CarIn.vue"),
      },{
        path: 'carOut',
        name: 'carOut',
        component: () => import("@/views/car/CarOut.vue"),
      },{
        path: 'carInAndOut',
        name: 'carInAndOut',
        component: () => import("@/views/car/CarInAndOut.vue"),
      },{
        path: 'memberList',
        name: 'memberList',
        component: () => import("@/views/member/MemberList.vue"),
      }]
    }
  ]
})

export default router
